package com.zgc.zkinfo;

import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;

import java.util.Arrays;
import java.util.List;

public class ZkNodeInfo {
    private String id;
    private String path;
    private String currentPath;
    private byte[] data;
    private List<ACL> acl;
    private  Stat stat = new Stat();

    public ZkNodeInfo() {
    }

    public ZkNodeInfo(String id) {
        this.id = id;
    }

    public ZkNodeInfo(String id, String path) {
        this.id = id;
        this.path = path;
    }

    public ZkNodeInfo(String id, String path, String currentPath) {
        this.id = id;
        this.path = path;
        this.currentPath = currentPath;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getCurrentPath() {
        return currentPath;
    }

    public void setCurrentPath(String currentPath) {
        this.currentPath = currentPath;
    }

    public byte[] getData() {
        return data;
    }

    public List<ACL> getAcl() {
        return acl;
    }

    public void setAcl(List<ACL> acl) {
        this.acl = acl;
    }

    public void setData(byte[] data) {
        this.data = data;
    }

    public Stat getStat() {
        return stat;
    }
    public void setStat(Stat stat) {
        this.stat = stat;
    }


    @Override
    public String toString() {
        return "ZkNodeInfo{" +
                "id='" + id + '\'' +
                ", path='" + path + '\'' +
                ", currentPath='" + currentPath + '\'' +
                ", data=" + Arrays.toString(data) +
                ", acl=" + acl +
                ", stat=" + stat +
                '}';
    }
}
